package com.climb.spingcloud.Listener;

import com.climb.spingcloud.dto.OrderDto;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author Administrator-NANA
 * @date 2021-08-02 15:36:33
 * @description
 */
@Slf4j
@Service
@RocketMQMessageListener(consumerGroup = "shop-user-group",topic = "myorder-topic")
public class SmsService implements RocketMQListener<OrderDto> {


    @Override
    public void onMessage(OrderDto orderDto) {
        log.info("收到一个订单信息{},接下来发送短信", orderDto);
    }
}
